package org.jeecg.modules.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.system.entity.District;
import org.jeecg.modules.system.mapper.DistrictMapper;
import org.jeecg.modules.system.service.IDistrictService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: district
 * @Author: jeecg-boot
 * @Date:   2022-12-23
 * @Version: V1.0
 */
@Service
public class DistrictServiceImpl extends ServiceImpl<DistrictMapper, District> implements IDistrictService {

    @Override
    public List<District> getNameById(String[] str) {
        QueryWrapper<District> wrapper = new QueryWrapper<>();
        wrapper.lambda().in(District::getId, str);
        wrapper.select("name");
        List<District> districts = this.list(wrapper);
        return districts;
    }
}
